﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<WRSManagementSystem.DomainModel.Entities.Project>" %>
<%@ Import Namespace="jMvcUI.Widgets" %>

    <%
        using (Html.BeginForm())
        {%>

        <fieldset>            
            <%=Html.HiddenFor(model => model.Id)%>
            <%
            Html.ValidationSummary();%>
            
            <div class="editor-label">
                <%=Html.Label("Nazwa")%>
            </div>
            <div class="editor-field">
                <%=Html.TextBoxFor(model => Model.Name)%>
                <%=Html.ValidationMessageFor(model => model.Name)%>
            </div>
            <div class="editor-label">
                <%=Html.Label("Koordynator")%>
            </div>
            <div class="editor-field">               
                <%=Html.DropDownListFor(model => model.Creator.Id, ViewData["Creators"] as SelectList)%>   
                <%= Html.ValidationMessageFor(model => model.Creator) %>             
            </div>
     
            <div class="editor-label">
                <%=Html.Label("Początek")%>
            </div>
            <div class="editor-field">
               <%= Html.DatePicker( "StartDate", Html.Encode(String.Format("{0:00}/{1:00}/{2:0000}",Model.StartDate.Month,Model.StartDate.Day,Model.StartDate.Year)) ) %> 

            </div>
            
            <div class="editor-label">
                <%=Html.Label("Koniec")%>
            </div>
            <div class="editor-field">

            <%= Html.DatePicker("EndDate", Html.Encode(String.Format("{0:00}/{1:00}/{2:0000}", Model.EndDate.Month, Model.EndDate.Day, Model.EndDate.Year)))%> 


            </div>
            
            <p>
                <input type="submit" value="Zapisz" />
            </p>
        </fieldset>

    <%
        }%>


